package com.lyn.scan.mvvm.presenter

import androidx.lifecycle.MutableLiveData
import com.lyn.mvp.contract.Contract
import com.lyn.mvp.model.Model
import com.lyn.mvp.model.Result

/**
 * @author Lyn
 * @date 2022/7/13
 * @desc
 */
class Presenter(private var liveData: MutableLiveData<Result>) : Contract.Presenter{
    private var model: Model = Model()


    override fun login(userName: String, password: String) {
        ThreadPoolManager.get().threadPool.execute {
            val result = model.login(userName, password)
            liveData.postValue(result)
        }

    }

}